package cn.bearspark.api.vo.main.vote;

import cn.bearspark.api.validation.Enumeration;
import cn.bearspark.happening.enumeration.vote.AnonymousEnum;
import cn.bearspark.happening.enumeration.vote.SynchronousEnum;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

/**
 * 投票请求的视图对象
 *
 * @author f
 */
@Data
public class VoteReqVO {

    /**
     * 投票的 id
     */
    @NotNull
    private Long voteId;

    /**
     * 投票选项 id 的列表
     */
    @NotEmpty
    private List<Integer> optionIdList;

    /**
     * 是否将投票同步到动态
     *
     * @see SynchronousEnum
     */
    @Enumeration(SynchronousEnum.class)
    private Integer synchronous;

    /**
     * 是否匿名投票
     *
     * @see AnonymousEnum
     */
    @Enumeration(AnonymousEnum.class)
    private Integer anonymous;

}
